import Vue from 'vue'
import Router from 'vue-router'
// 导入编写的组件
import Index from '../components/Index'
import Login from '../components/Login'
import Exam from '../components/Exam'
import Fraction from '../components/fraction'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/exam',
      name: 'exam',
      component: Exam,
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/fraction',
      name: 'fraction',
      component: Fraction,
      meta: {
        requireAuth: true
      }
    }

  ]
})
